home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CLPRNT24.ARJ / CL-PRINT.DOC < prev   
Text File  |  1992-05-03  |  15KB  |  312 lines

  1.                           CL-Print Version 2.40
  2.                     Caller Log Comment for PCBoard 14.x
  3.  
  4. By Gary Meeker                                                      05/03/92
  5.           ______________________________________________________
  6.  
  7.  
  8. I looked at several programs to this job but they all used a fixed format or
  9. inserted their name in the comment.   They were also written in C, Pascal or
  10. QuickBasic and were rather bulky for the job.   All I wanted was a simple
  11. program to place any desired comment in the CALLER file. The program had to
  12. maintain the 64 character fixed length format (62 characters text,CR,LF) and
  13. a few substitutions would be handy, like /T for 'HH:MM' (current time), /D
  14. for 'MM-DD-YY' (current date),  /A for ' at MM-DD-YY HH:MM:SS' and  /L for
  15. 'MM-DD-YY (HH:MM)' (short cuts for current date and time in PCBoard formats).
  16. Also /S for 6 spaces (to make indenting easy) and // to actually include a
  17. '/' in the text. The result of this was CL-PRINT.COM written in assembly for
  18. speed and size. It is less than 1K in length so fits into 1 cluster on most
  19. drives. (1023 Bytes, that was tough to keep below as I added features.)
  20. Version 2 has grown, but remains under 2k (2045) which is still 1 cluster
  21. on most Hard Drives.
  22.  
  23.  
  24.     Format:   CL-PRINT filespec logstring
  25.  
  26.     Remarks:  The filespec parameter may include a drive letter
  27.               and a path in addition to the filename for the
  28.               CALLER file.
  29.  
  30.               Logstring may consist of text characters enclosed
  31.               within (double) quote marks or ASCII decimal codes
  32.               whose numbers are separated by commas. (You may
  33.               seperate enteries by a semi-colon or space also.)
  34.  
  35.     Example:  To indicate the completion of the event you would enter
  36.  
  37.          CL-PRINT C:\PCB\CALLER "/SScheduled Event Ended/A"
  38.  
  39.     Example:  To indicate a program logging on you might enter
  40.  
  41.          CL-PRINT C:\PCB\CALLER "/L PCBFILE.EXE 3.1ß (Event) (G) BEGIN"
  42.  
  43.               or to enter 'ß' you might use decimal code entry as
  44.  
  45.          CL-PRINT C:\PCB\CALLER "/L PCBFILE.EXE 3.1",225," (Event) (G) BEGIN"
  46.  
  47. Anything within the quotes is included in the text string for the comment
  48. except the '/' character which is the substitute switch.  The character
  49. following the '/'is also not included unless it is another '/'. If you need
  50. to include the double quote character itself, you can use decimal entry
  51. format or use single quotes to enclose the string. Whichever quote starts
  52. the string must be the same quote to end the string. Other than that they
  53. are interchangable and the line
  54.  
  55.          CL-PRINT C:\PCB\CALLER "/L PCBFILE.EXE 3.1",225,' (Event) (G) BEGIN'
  56.  
  57. would be identical to the previous example. The best way to understand it
  58. all is to play with it. Just use a dummy filename for the CALLER filename
  59. so as not to bother it until you are ready. If the file does not exist it
  60. will be created (new with version 2).
  61.  
  62. The substitute characters are
  63.  
  64. /A for ' at MM-DD-YY HH:MM:SS'  - Used mainly at the end of a comment
  65. /D for 'MM-DD-YY'               - Used anywhere you need the current date
  66. /L for 'MM-DD-YY (HH:MM)'       - Used mainly at the start of a comment
  67. /S for 6 spaces                 - Used mainly at the start of a comment
  68. /T for 'HH:MM'                  - Used anywhere you need the current time
  69. /* for 62 astrics               - Used anywhere, will create a second line
  70. // for '/'                      - Used to include a '/' character
  71. /Q quiet mode                   - Used to suppress program output to console
  72. /N New file (don't append)      - Used to start a new file
  73. /Z ASCIIZ                       - Used to suppress padding of Numeric Variables
  74. /B use BIOS Time & Date serv.   - Used to read Real Time Clock instead of DOS
  75.  
  76. The Substitute characters may be used inside or outside the quotes so
  77.  
  78.          CL-PRINT C:\PCB\CALLER /S,"Scheduled Event Ended",/A
  79.  
  80. is identical to the previous example.
  81.  
  82. New with version 2 is the ability to use @ variables (single letters, not
  83. the full word variables used in PCBoard, with the 128 character command line
  84. limit imposed by DOS, it wasn't worth trying to use the long variables).
  85. If the @ symbol is found in the command line, PCBOARD.SYS, PCBOARD.DAT &
  86. USERS files are read (in that order). PCBOARD.SYS & PCBOARD.DAT must be in
  87. the current directory so you may need to change to the proper directory
  88. before running CL-PRINT (New with v2.30 allows use of environment variables
  89. PCBDRIVE & PCBDIR to locate PCBOARD.SYS & PCBOARD.DAT). PCBOARD.DAT file
  90. is read only to obtain the location & filename of the USERS file. This
  91. eliminates the need to use any kind of config file for CL-PRINT or extra
  92. command line parameters to locate files & allows the full command line for
  93. generating the desired text. A lot of the variables probably will never be
  94. used but I included just about everyting I could to make everyone happy.
  95. You can even use CL-PRINT to generate a batch file that could then be executed.
  96.  
  97. The Substitute Variables are
  98.  
  99. @F - First Name (Proper Case 15 characters)
  100. @? - Password (12 characters)
  101. @N - User Full Name (25 characters)
  102. @C - City, State (24 characters)
  103. @B - Bus/Data Phone (13 characters)
  104. @H - Home/Voice Phone (13 characters)
  105. @D - Last Date On (MM-DD-YY)
  106. @T - Last Time On (HH:MM)
  107. @! - Expert Mode (Y or N)
  108. @P - Default Protocol - Single Letter
  109. @L - Last Dir Scan (MM-DD-YY)
  110. @A - Security Level Access (3 characters - Numeric)
  111. @# - Number of Times On System (5 characters - Numeric)
  112. @M - Time Spent on Last Call (5 characters - Numeric)
  113. @E - Expiration Date  (MM-DD-YY)
  114. @X - Expiration Sec Level (3 characters - Numeric)
  115. @U - User Maintained Comment (30 characters)
  116. @S - Sysop Maintained Comment (30 characters)
  117. @R - Record Number (5 characters - Numeric)
  118. @G - Time User Logged On (HH:MM)
  119. @Z - Language Extension (4 characters) - or blank if default
  120. @* - Time Remaining (5 characters - Numeric)
  121. @V - Event Time (HH:MM)
  122. @= - FileName based on Users Full Name (useful in batch files)
  123.      (up to 8 characters from First Name & 3 characters from Last Name,
  124.      Only 0-9 & A-Z are used and any other character is changed to '$'
  125.      to prevent illegal DOS filenames from being created.) Users with a
  126.      single name will not have an extension on the filename. Users with
  127.      more than 2 names will use the 2nd name for the extension.
  128.  
  129.      Examples:
  130.  
  131.      User Name                  FileName
  132.      -------------------------  ------------
  133.      CHRISTOPHER JUDITH         CHRISTOP.JUD
  134.      SYLVESTER HALL             SYLVESTE.HAL
  135.      O.LENNOX DOOLEY            O$LENNOX.DOO
  136.      FRANCES BOBSMITH           FRANCES.BOB
  137.      J.R. HOLLY                 J$R$.HOL
  138.      BOB ELY                    BOB.ELY
  139.      LAWRENCE KESTELROT         LAWRENCE.KES
  140.      SAM O'PRY                  SAM.O$P
  141.      JUNG-YUL LEE               JUNG$YUL.LEE
  142.      L. WILLARD                 L$.WIL
  143.      GEOFFREY WARREN SPARK      GEOFFREY.WAR
  144.      WAYNE STEINARD TAYLOR      WAYNE.STE
  145.      ONELONGNAME                ONELONGN.
  146.      A                          A.
  147.  
  148.  
  149. Any other Character following the @ will be printed (but the @ will not, use
  150. @@ to print a single @ symbol).  If /Z is used it must be used before any @
  151. variables. It causes numeric variables not to be padded to the fixed lengths
  152. listed above (3 or 5 characters). Strings are always padded to full length.
  153.  
  154. Example:
  155.  
  156.          CL-PRINT C:\PCB\MAIN\CALLER /Q,/S,"Last On: @D (@T)"
  157. or
  158.          CL-PRINT C:\PCB\MAIN\CALLER /Q,/Z,/S,"Last On: @D (@T) for @M Minute(s)"
  159.  
  160. This example when run in your $$LOGON.BAT comes in handy for CALLS.EXE along
  161. with the modifications I made to it (this will be available from my BBS as
  162. CL14S23A.ZIP),   The entry allows the generation of a Report:
  163.  
  164.  
  165.                             -= Last Called In =-
  166.  
  167.      Within One Week:    59 (28.1%) │░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
  168.         Previous Day:    44 (21.0%) │▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█
  169.             Same Day:    32 (15.2%) │▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█
  170.     Within Two Weeks:    18 ( 8.6%) │░░░░░░░░░░░░█
  171.     Within One Month:    14 ( 6.7%) │▓▓▓▓▓▓▓▓▓█
  172.   Within Four Months:     9 ( 4.3%) │▒▒▒▒▒▒█
  173.            New Users:     7 ( 3.3%) │░░░░█
  174.    Within Six Months:     5 ( 2.4%) │▓▓▓█
  175.   Within Nine Months:     4 ( 1.9%) │▒▒█
  176.    Within Two Months:     4 ( 1.9%) │░░█
  177.     Within Two Years:     3 ( 1.4%) │▓█
  178.      Within One Year:     1 ( 0.5%) │█
  179.  
  180. An Example of a batch file might be:
  181.  
  182. CL-PRINT DOIT.BAT "/N/Q/Z@@ECHO OFF",13,10,"IF !@R!==!2000! COPY YEAH GEN\NEWS"
  183.  
  184. NOTE: SHARE must be loaded if you intend to write to the CALLER log during
  185.       $$LOGON.BAT or $$LOGON.BAT as PCBoard has the file open and has written
  186.       entries to it prior to calling the batch files. If SHARE is not loaded
  187.       you will write over the top of the entries PCBoard has made. Also,
  188.       this can only be done on Network verisons /E & /U and you CAN NOT
  189.       use it on /D or /S versions as PCBoard has the USERS file open in
  190.       DENY READ/WRITE on these versions, so the file can not be opened by
  191.       CL-PRINT to obtain the information desired. This is true in $$LOGON.BAT
  192.       as well as PCBTEST.BAT, etc. As long as no '@' variables are used,
  193.       there should be no problem writing messages to the CALLER log at these
  194.       times though.
  195.  
  196. Other uses for CL-PRINT would be to create batch files on the fly that can
  197. then be executed, such as a printer redirection using PC Magazines PRN2FILE
  198.  
  199. CL-PRINT REDIRECT.BAT /N,'PRN2FILE C:\PCB\DL\@='
  200. CALL REDIRECT.BAT
  201. IF EXIST REDIRECT.BAT DEL REDIRECT.BAT
  202. CL-PRINT DELETEIT.BAT /N,'IF EXIST C:\PCB\DL\@= DEL C:\PCB\DL\@='
  203.  
  204. The first line would create a batch file named REDIRECT.BAT containing the line
  205.  
  206. PRN2FILE C:\PCB\DL\GARY.MEE
  207.  
  208. if I was the User on the BBS at the time. And the second line would execute
  209. the new batch file. No trapping is done for illegal device names contained in
  210. the Users name at this time. If it is a problem, I can add it somewhere down
  211. the road. The 3rd deletes the batch file. The last line creates a batch file
  212. called DELETE.BAT and you would add the lines:
  213.  
  214. IF EXIST DELETEIT.BAT CALL DELETEIT.BAT
  215. IF EXIST DELETEIT.BAT DEL DELETEIT.BAT
  216.  
  217. to your $$LOGOFF.BAT to execute the batch file and then delete it. The
  218. batch file would contain the line:
  219.  
  220. IF EXIST C:\PCB\DL\GARY.MEE DEL C:\PCB\DL\GARY.MEE
  221.  
  222. Note: CL-PRINT always appends to the file specified, so if you don't delete
  223. it, it will continue to grow. New with v2.30 you can specify a /N to cause
  224. the file to not be appended. This will start a NEW file.
  225.  
  226. ---------------------------------------------------------------------------
  227.  
  228. License info
  229. ------------
  230. CL-PRINT is copyrighted.  You are hereby granted a license  to use, copy,
  231. and distribute it freely  provided no modification is made  to the program
  232. or this documentation,  documentation  stays with the program and there is
  233. no charge for the service. You can modify it but don't distribute modified
  234. copies.
  235.  
  236. This program is being released as Public Domain but if you want to send me
  237. money, I'll take it (gotta get another CD-Rom Drive for the BBS someway.)
  238. I have checked carefully to make sure that no combination of entries can
  239. lock up the computer, scramble the CALLERS log or otherwise create problems,
  240. but none the less make a backup before trying out this or any program.
  241.  
  242. The program is distributed AS-IS with no warranty expressed or implied.
  243. It is the responsibility of each user to determine the fitness of this
  244. program. The author cannot be held responsible for damages caused by the
  245. use of the program.
  246.  
  247. Any Questions, Comments or Requests for changes can be directed thru my BBS:
  248.  
  249. SHARP Technical Support Line BBS (404) 962-1788  9600/2400/1200/300 24 Hours.
  250.  
  251. via Fax: (404) 995-0613
  252.  
  253. or via mail:
  254.  
  255. Gary Meeker
  256. C/O SHARP Electronics Corporation
  257. 725-C Old Norcross Road
  258. Lawrenceville, GA  30245
  259.  
  260.  
  261. ACKNOWLEDGEMENTS
  262.  
  263. PCBoard is a registered trademark of the Clark Development Company.
  264.  
  265. I would like to thank Fred Clark and the Clark Development Company
  266. Program Team for developing such an outstanding BBS program and for
  267. their continued support to customers and third party software
  268. developers.
  269.  
  270. History:
  271.  
  272. 03-07-91  V1.00  Initial Release
  273.  
  274. 02-14-92  V2.00  Added @ Variable subsitution & reading of
  275.                  PCBOARD.SYS, PCBOARD.DAT & USERS File if variable is used.
  276.                  Added file creation if file does not exist.
  277.  
  278. 02-22-92  V2.10  Changed Mode files were opened in to avoid SHARE violations
  279.                  and added better error message displays to indicate just
  280.                  what error was occuring when opening a file. Also changed
  281.                  DOCS to explain the need for SHARE.
  282.  
  283. 03-11-92  V2.20  Added @= for a FileName to be created from Users Name
  284.                  (8 characters from First Name & 3 characters from Last Name)
  285.  
  286. 03-12-92  V2.30  Corrected @= variable to work on First names longer than 8
  287.                  characters. Will now skip to the last name and pick up 3
  288.                  characters from the last name. Also will translate illegal
  289.                  DOS filename characters (and more) to '$'. No checking is
  290.                  done for illegal device names so beware.
  291.  
  292.                  Added Environment checking if the PCBOARD.SYS & PCBOARD.DAT
  293.                  files are not found in the current directory, then the DOS
  294.                  environment variables PCBDRIVE & PCBDIR will be checked and
  295.                  the file will be checked for in that directory.
  296.  
  297.                  Added /N to start a NEW output file instaed of appending it.
  298.  
  299. 05-03-92  V2.40  Changed routine to use DOS Time and Date services instead
  300.                  of BIOS routines for Real-Time clock. This allows use on
  301.                  XT units. Added /B switch to use BIOS routines as before.
  302.                  the /B switch must preceed any commands to display Time
  303.                  or Date entries. If you have trouble with Time & Date and
  304.                  it used to work, add the /B to the beginning of the entries.
  305.                  I don't have any computers that will not respond properly
  306.                  to BIOS Time/Date services 02/04 of Int 1Ah so I was not
  307.                  aware of any difficulties. Anyone with an XT that finds
  308.                  the program didn't work, but now does (ie. it doesn't work
  309.                  with the /B but does without it, let me know, so I know I
  310.                  have it working for everyone. (Yikes, running a BBS on an
  311.                  XT, how rude)).
  312.